Optimal. Leaf size=162 \[ \frac{(c x)^{m+1} \left (a^2 b f+a^3 (-g)-a b^2 e+b^3 d\right ) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right )}{a b^3 c (m+1)}+\frac{(c x)^{m+1} \left (a^2 g-a b f+b^2 e\right )}{b^3 c (m+1)}+\frac{x^{n+1} (c x)^m (b f-a g)}{b^2 (m+n+1)}+\frac{g x^{2 n+1} (c x)^m}{b (m+2 n+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.167104, antiderivative size = 162, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 36, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {1844, 20, 30, 364} \[ \frac{(c x)^{m+1} \left (a^2 b f+a^3 (-g)-a b^2 e+b^3 d\right ) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right )}{a b^3 c (m+1)}+\frac{(c x)^{m+1} \left (a^2 g-a b f+b^2 e\right )}{b^3 c (m+1)}+\frac{x^{n+1} (c x)^m (b f-a g)}{b^2 (m+n+1)}+\frac{g x^{2 n+1} (c x)^m}{b (m+2 n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1844
Rule 20
Rule 30
Rule 364
Rubi steps
\begin{align*} \int \frac{(c x)^m \left (d+e x^n+f x^{2 n}+g x^{3 n}\right )}{a+b x^n} \, dx &=\int \left (\frac{\left (b^2 e-a b f+a^2 g\right ) (c x)^m}{b^3}+\frac{(b f-a g) x^n (c x)^m}{b^2}+\frac{g x^{2 n} (c x)^m}{b}+\frac{\left (b^3 d-a b^2 e+a^2 b f-a^3 g\right ) (c x)^m}{b^3 \left (a+b x^n\right )}\right ) \, dx\\ &=\frac{\left (b^2 e-a b f+a^2 g\right ) (c x)^{1+m}}{b^3 c (1+m)}+\frac{g \int x^{2 n} (c x)^m \, dx}{b}+\frac{(b f-a g) \int x^n (c x)^m \, dx}{b^2}+\frac{\left (b^3 d-a b^2 e+a^2 b f-a^3 g\right ) \int \frac{(c x)^m}{a+b x^n} \, dx}{b^3}\\ &=\frac{\left (b^2 e-a b f+a^2 g\right ) (c x)^{1+m}}{b^3 c (1+m)}+\frac{\left (b^3 d-a b^2 e+a^2 b f-a^3 g\right ) (c x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{b x^n}{a}\right )}{a b^3 c (1+m)}+\frac{\left (g x^{-m} (c x)^m\right ) \int x^{m+2 n} \, dx}{b}+\frac{\left ((b f-a g) x^{-m} (c x)^m\right ) \int x^{m+n} \, dx}{b^2}\\ &=\frac{(b f-a g) x^{1+n} (c x)^m}{b^2 (1+m+n)}+\frac{g x^{1+2 n} (c x)^m}{b (1+m+2 n)}+\frac{\left (b^2 e-a b f+a^2 g\right ) (c x)^{1+m}}{b^3 c (1+m)}+\frac{\left (b^3 d-a b^2 e+a^2 b f-a^3 g\right ) (c x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{b x^n}{a}\right )}{a b^3 c (1+m)}\\ \end{align*}
Mathematica [A] time = 0.341273, size = 130, normalized size = 0.8 \[ \frac{x (c x)^m \left (\frac{\left (a^2 b f+a^3 (-g)-a b^2 e+b^3 d\right ) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right )}{a (m+1)}+\frac{a^2 g-a b f+b^2 e}{m+1}+\frac{b x^n (b f-a g)}{m+n+1}+\frac{b^2 g x^{2 n}}{m+2 n+1}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.384, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( cx \right ) ^{m} \left ( d+e{x}^{n}+f{x}^{2\,n}+g{x}^{3\,n} \right ) }{a+b{x}^{n}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\left (b^{3} c^{m} d - a b^{2} c^{m} e + a^{2} b c^{m} f - a^{3} c^{m} g\right )} \int \frac{x^{m}}{b^{4} x^{n} + a b^{3}}\,{d x} + \frac{{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} b^{2} c^{m} g x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )} +{\left ({\left (m^{2} + m{\left (3 \, n + 2\right )} + 2 \, n^{2} + 3 \, n + 1\right )} b^{2} c^{m} e -{\left (m^{2} + m{\left (3 \, n + 2\right )} + 2 \, n^{2} + 3 \, n + 1\right )} a b c^{m} f +{\left (m^{2} + m{\left (3 \, n + 2\right )} + 2 \, n^{2} + 3 \, n + 1\right )} a^{2} c^{m} g\right )} x x^{m} +{\left ({\left (m^{2} + 2 \, m{\left (n + 1\right )} + 2 \, n + 1\right )} b^{2} c^{m} f -{\left (m^{2} + 2 \, m{\left (n + 1\right )} + 2 \, n + 1\right )} a b c^{m} g\right )} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{{\left (m^{3} + 3 \, m^{2}{\left (n + 1\right )} +{\left (2 \, n^{2} + 6 \, n + 3\right )} m + 2 \, n^{2} + 3 \, n + 1\right )} b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (g x^{3 \, n} + f x^{2 \, n} + e x^{n} + d\right )} \left (c x\right )^{m}}{b x^{n} + a}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (g x^{3 \, n} + f x^{2 \, n} + e x^{n} + d\right )} \left (c x\right )^{m}}{b x^{n} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]